package core;

public class HP {
	public int HP;
	
	public HP(int pAtk, int pDef, int pVel)
	{
		HP=Math.round((300+pAtk+pDef+pVel)/3);
	}
	public HP(int pHP)
	{
		HP=pHP;
	}
	
	public int getHp()
	{
		return HP;
	}
	public void setHP(int pHP)
	{
		HP=pHP;
	}
	
	public void masHP(int mas)
	{
		HP+=mas;
	}
	public void menosHP(int menos)
	{
		HP-=menos;
	}
	
	public boolean Igual(int pHP)
	{
		return HP==pHP;
	}
	public boolean Igual(HP pHP)
	{
		return HP==pHP.HP;
	}
	
	public boolean Vivo()
	{
		return HP>0;
	}
	
	public String toString()
	{
		return "HP= "+HP;
	}

}
